<?php
/**
 * Each engineer has a duty to keep the code elegant
 * Created by wolffy.
 * Author @wolffy<13750088090@sina.cn>
 * Date: 2018/12/19
 * Time: 21:48
 */
namespace App\Services\BackendApi;

use App\Repositories\UserCreditCardRepository;

class CreditCardService extends CommonService
{
    protected $userCreditCardRepository;

    public function __construct(UserCreditCardRepository $userCreditCardRepository)
    {
        parent::__construct();
        $this->userCreditCardRepository = $userCreditCardRepository;
    }

    public function getList($request)
    {
        if ($request['start_time'] > $request['end_time']) {
            return $this->responseJson(1010000);//开始时间大于结束时间
        }
        $data = $this->userCreditCardRepository->getCardList($request);
        return $this->responseJson(0, $data);
    }
}